package com.lvcoding.oauth2.resource.shizhan.controller;

import lombok.val;
import lombok.var;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * @author wuyanshen
 */
@RequestMapping("user")
@RestController
public class UserController {

    @GetMapping("info")
    public String info() {
        return "我是用户信息";
    }

    @GetMapping("test")
    public ResponseEntity test() {
        var map = new HashMap<>(3);
        map.put("code", 200);
        map.put("msg", "我是测试信息");
        return new ResponseEntity(map, HttpStatus.OK);
    }
}
